<?php
/**
 * +--------------------------------------------------------+
 * @Created by PhpStorm.
 * @Category YbsArticleCommand.php
 * @Depiction:
 * Author: hwy
 * Date: 2020/6/19  10:21
 * +--------------------------------------------------------+
 */

namespace App\Console\Commands;

use App\Services\StockService;
use Illuminate\Console\Command;

class StockCapCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:capstock';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '股票数据监控';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->info("获取开始..." . date('Y-m-d H:i:s'));
        StockService::getInstance()->monitorCapStock();

        $this->info("获取结束..." . date('Y-m-d H:i:s'));
    }

}
